package edu.yngsxy.wkstudy.core.sys.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import edu.yngsxy.wkstudy.core.model.entity.WkBaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
/**
 * <p>
 * 试卷与试题的多对多关联表
 * </p>
 *
 * @author group 2
 * @since 2025-09-09
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("exampaperquestion")
@Schema(description = "试卷与试题的多对多关联表")
public class Exampaperquestion extends WkBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 试卷ID（外键，关联ExamPaper）
     */
    @TableField("exam_paper_id")
    @Schema(title = "试卷ID（外键，关联ExamPaper）", description = "试卷ID（外键，关联ExamPaper）", requiredMode =Schema.RequiredMode.REQUIRED)
    @NotNull(message = "试卷ID（外键，关联ExamPaper）不能为空")
    private Integer examPaperId;

    /**
     * 试题ID（外键，关联Question）
     */
    @TableField("question_id")
    @Schema(title = "试题ID（外键，关联Question）", description = "试题ID（外键，关联Question）", requiredMode =Schema.RequiredMode.REQUIRED)
    @NotNull(message = "试题ID（外键，关联Question）不能为空")
    private Integer questionId;

    /**
     * 试题分值
     */
    @TableField("score")
    @Schema(title = "试题分值", description = "试题分值", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    private BigDecimal score;
}
